#ifndef CLICKEDBTN_H
#define CLICKEDBTN_H

#include <QPushButton>

class ClickedBtn : public QPushButton
{
    Q_OBJECT
public:
    ClickedBtn(QWidget* paren = nullptr);
    ~ClickedBtn();
    void SetState(QString normal, QString hover, QString press); // 设置 ClickedBtn 的初始状态

protected:
    virtual void enterEvent(QEvent* event) override; // 鼠标进入
    virtual void leaveEvent(QEvent* event) override; // 鼠标离开
    virtual void mousePressEvent(QMouseEvent* event) override; // 鼠标按下
    virtual void mouseReleaseEvent(QMouseEvent* event) override; // 鼠标释放

private:
    // 鼠标的三种情况
    QString _normal;
    QString _hover;
    QString _press;
};

#endif // CLICKEDBTN_H
